using System;
using System.ComponentModel.DataAnnotations;

namespace ERP.ERPSystem.WarehouseManagement.Dto
{
    /// <summary>
    /// 来料检验新增DTO
    /// </summary>
    public class IncomingInspectionCreateDto
    {
        /// <summary>
        /// 来料检验单编号
        /// </summary>
        [Required(ErrorMessage = "来料检验单编号不能为空")]
        [MaxLength(30, ErrorMessage = "来料检验单编号长度不能超过30")]
        public string IncomingInspectionCode { get; set; }

        /// <summary>
        /// 来料检验单名称
        /// </summary>
        [Required(ErrorMessage = "来料检验单名称不能为空")]
        [MaxLength(30, ErrorMessage = "来料检验单名称长度不能超过30")]
        public string IncomingInspectionName { get; set; }

        /// <summary>
        /// 供应商简称
        /// </summary>
        [Required(ErrorMessage = "供应商简称不能为空")]
        [MaxLength(30, ErrorMessage = "供应商简称长度不能超过30")]
        public string IncomingInspectionJName { get; set; }

        /// <summary>
        /// 供应商批次号
        /// </summary>
        [Required(ErrorMessage = "供应商批次号不能为空")]
        [MaxLength(30, ErrorMessage = "供应商批次号长度不能超过30")]
        public string Batch { get; set; }

        /// <summary>
        /// 产品物料编号
        /// </summary>
        [Required(ErrorMessage = "产品物料编号不能为空")]
        [MaxLength(30, ErrorMessage = "产品物料编号长度不能超过30")]
        public string ProductCode { get; set; }

        /// <summary>
        /// 产品物料名称
        /// </summary>
        [Required(ErrorMessage = "产品物料名称不能为空")]
        [MaxLength(30, ErrorMessage = "产品物料名称长度不能超过30")]
        public string ProductName { get; set; }

        /// <summary>
        /// 接收数量
        /// </summary>
        public int? ReceiveNum { get; set; }

        /// <summary>
        /// 检测数量
        /// </summary>
        public int? TestingNum { get; set; }

        /// <summary>
        /// 不合格数
        /// </summary>
        public int? UnqualifiedNum { get; set; }

        /// <summary>
        /// 检测结果
        /// </summary>
        [Required(ErrorMessage = "检测结果不能为空")]
        [MaxLength(30, ErrorMessage = "检测结果长度不能超过30")]
        public string TestingResult { get; set; }

        /// <summary>
        /// 来料日期
        /// </summary>
        [Required(ErrorMessage = "来料日期不能为空")]
        public DateTime IncomingDate { get; set; }

        /// <summary>
        /// 检测日期
        /// </summary>
        [Required(ErrorMessage = "检测日期不能为空")]
        public DateTime TestingDate { get; set; }

        /// <summary>
        /// 检测人员
        /// </summary>
        [Required(ErrorMessage = "检测人员不能为空")]
        [MaxLength(30, ErrorMessage = "检测人员长度不能超过30")]
        public string TestingPerson { get; set; }

        /// <summary>
        /// 单据状态 (0=草稿，1=已确认，2=已完成)
        /// </summary>
        public int? State { get; set; } = 0;
    }
} 